package cn.edu.hpu.jie.services;

import java.util.List;

import cn.edu.hpu.jie.dao.VoteDao;
import cn.edu.hpu.jie.entity.VoteInfo;

public class VoteService {
	private VoteDao dao = new VoteDao();
	
	public int insertVoteInfo(VoteInfo vi) {
		return dao.insertVoteInfo(vi);
	}

	public List<String> getNoAll() {
		return dao.getNoAll();
	}

	public int vote(int key, String vote) {
		String[] voteArray = vote.split(",");
		return dao.insertVote(key, voteArray);
	}
}
